<template>
  <section>
    <div>son我是子组件 - {{ value }} <button @click="changemsg">changemsg</button></div>
    <div>son我是子组件 - {{ num }} <button @click="changenum">changenum</button></div>
  </section>
</template>

<script>
export default {
  props: ['value', 'num'],
  methods: {
    changemsg() {
      this.$emit('input', 'XYZ')
    },
    changenum() {
      // this.$emit('changeNum', 999)
      this.$emit('update:num', 999)
    }
  }
}
</script>

<style>

</style>
